<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 制造字母异位词的最小步骤数 -->
    <script>
      var minSteps = function (s, t) {
        let hash = {}
        for (let c of s) {
          hash[c] = ++hash[c] || 1
        }
        for (let c of t) {
          if (hash[c]) hash[c]--
        }
        let ans = 0
        for (let k in hash) {
          ans += hash[k]
        }
        return ans
      }
      console.log(minSteps('bab', 'aba'))
    </script>
  </body>
</html>
